Previous: HTTP URL Options, Up: http/https


3.1.4 Dealing with HTTP documents

HTTP URLs are retrieved into a buffer containing the HTTP headers followed by the body. Since the headers are quasi-MIME, they may be processed using the MIME library. See Emacs MIME. The URL package provides a function to do this in general:

— Function: url-decode-text-part handle &optional coding

This function decodes charset-encoded text in the current buffer. In Emacs, the buffer is expected to be unibyte initially and is set to multibyte after decoding. HANDLE is the MIME handle of the original part. CODING is an explicit coding to use, overriding what the MIME headers specify. The coding system used for the decoding is returned.

Note that this function doesn't deal with ‘http-equiv’ charset specifications in HTML ‘<meta>’ elements.